package com.food.dao.service;

import java.util.List;

import com.food.dao.MessageDAOJdbc;
import com.food.dao.in.MessageDAO;
import com.food.model.Message;

public class MessageService {
	MessageDAO dao = new MessageDAOJdbc();
	
	public void insertMessage(Message bean){
		dao.insertMessage(bean);
	}

	public void updateMessage(Message bean){
		dao.updateMessage(bean.getRid(),bean.getMbid(),bean.getMessageword(),bean.getMessageid());
		
	}

	public void deleteMessage(Message bean){
		dao.deleteMessage(bean.getMessageid());
	}

	public List<Message> findMessageByRecipe(Message bean){
		
		return dao.findMessageByRecipe(bean.getRid());
	}
	
	public List<Message> findMessageByMb(Message bean){
		return dao.findMessageByMb(bean.getMbid());
	}
}
